![]() |
OPC-UA Embedded Server SDK
2.1.0
|
Functions | |
| UA_Status_t | UAServer_Generate_certificate (void) |
| UA_Status_t | UAServer_Get_certificate_size (uint32_t *size_in_bytes) |
| UA_Status_t | UAServer_Read_certificate (UA_Byte_string_t *certificate) |
| UA_Status_t | UAServer_Write_certificate (UA_Byte_string_t *certificate) |
| UA_Status_t UAServer_Generate_certificate | ( | void | ) |
Generate Application Instance Certificate
The OPC UA Server optionally requires an X.509 application instance certificate. Version 1.02 of the OPC-UA Standard made this certificate optional for servers that do not support secure channels (x509 authentication and encryption) but for backward compatibility with OPC-UA Clients designed to version 1.01 of the standard it it is recommended to always generate a certificate. This certificate contains the server URI and server hostnames or IP addresses. If this information changes the server certificate must be regenerated by calling this function. This function creates a certificate including signing of the certificate using RSA encryption. This is a resource intensive operation so (depending on your platform) should only be done once during initialisation.
| UA_Status_t UAServer_Get_certificate_size | ( | uint32_t * | size_in_bytes | ) |
Read Application instance Certificate size
Certificate generation via UAServer_Generate_certificate() is a resource intensive operation that can be very slow on some platforms. If the IP Address or Hostname of the server remains the same then the generated certificate will be the same each time. Instead of generating the certificate on every POST, the certificate can be generated (on a development system or on the target) once and then provided at POST in order to shorten boot time.
Provides the size of the generated certificate to facilitate the host application allocating sufficient memory to read out the certificate.
| [out] | size_in_bytes | The size of the generated certificate in bytes. |
| UA_Status_t UAServer_Read_certificate | ( | UA_Byte_string_t * | certificate | ) |
Read Application instance Certificate
Certificate generation via UAServer_Generate_certificate() is a resource intensive operation that can be very slow on some platforms. If the IP Address or Hostname of the server remains the same then the generated certificate will be the same each time. Instead of generating the certificate on every POST, the certificate can be generated (on a development system or on the target) once and then provided at POST in order to shorten boot time.
Copies the generated certificate into the byte string provided.
| [out] | certificate | The generated certificate is copied into the preallocated byte string. |
| UA_Status_t UAServer_Write_certificate | ( | UA_Byte_string_t * | certificate | ) |
Write Application instance Certificate
Certificate generation via UAServer_Generate_certificate() is a resource intensive operation that can be very slow on some platforms. If the IP Address or Hostname of the server remains the same then the generated certificate will be the same each time. Instead of generating the certificate on every POST, the certificate can be generated (on a development system or on the target) once and then provided at POST in order to shorten boot time.
Copies the certificate from the byte string provided and uses it as the Application Instance Certificate.
| [in] | certificate | The certificate is copied into the server from the byte string. |